package common;


import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

import java.lang.reflect.Method;

/**
 * @Description: This is a sample class.
 * @Author: Simon
 */
public class WordServiceInterceptor implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        System.out.println("Do something before the word explodes");
        Object result = invocation.proceed();
        System.out.println("Do something after the word explodes");
        return result;
    }

}
